<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Follow extends CI_Controller {
    function __construct() {
        parent::__construct();
        date_default_timezone_set('UTC');
        $this->load->model('manage_follow');
        $this->load->helper('form');
        $this->load->helper('file');
    }
    public function index() {
         
    }
    function followUser(){
        $follower = $this->input->post('follower');
        $user_id = $this->input->cookie('LEAPSESSID');
        $insert = $this->manage_follow->follows($user_id,$follower);
        echo json_encode($insert);
    }
    function unFollowUser(){
        $follower = $this->input->post('follower');
        $user_id = $this->input->cookie('LEAPSESSID');
        $insert = $this->manage_follow->unFollows($user_id,$follower);
        echo json_encode($insert);
    }
}